package com.mlm.mlmapp.adapter.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.widget.EditText;

/**
 * Created by Administrator on 2016/4/15 0015.
 */
public class EditTextPreIme extends EditText {
    public EditTextPreIme(Context context) {
        super(context);
    }

    public EditTextPreIme(Context context, AttributeSet attrs){
        super(context, attrs);
    }

    public EditTextPreIme(Context context, AttributeSet attrs, int defStyle){
        super(context, attrs, defStyle);
    }

    @Override
    public boolean dispatchKeyEventPreIme(KeyEvent event) {
//        if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
//            ((Activity)this.getContext()).onKeyDown(KeyEvent.KEYCODE_BACK, event);
//            ((Activity)this.getContext()).finish();
//            return true;
//        } else {
//            return super.dispatchKeyEvent(event);
//        }
        return super.dispatchKeyEvent(event);
    }
}
